package component;

import javax.vecmath.Point3d;

import math.Spherical;
import node.IntersectionValidator;

public class ComponentFactory {

	private final IntersectionValidator validator;
	
	public ComponentFactory(IntersectionValidator validator) {
		this.validator = validator;
	}
	
	public Ball createBall(Point3d position) {
		return new Ball(position, validator);
	}
	
	public Tube createTube(Point3d position, Spherical orientation) {
		return new Tube(position, orientation.getZ(), orientation.getY(), validator);
	}
}
